<?php
/**
 * 进销存系统对转换器提交实际可用库存量的API接口信息
 * Created by PhpStorm.
 * User: kdw
 * Date: 14-8-22
 * Time: 下午2:38
 */
 
require_once(Kohana::find_file('vendor','phprpc/phprpc_server'));

class Controller_Adapterstockapi extends Controller
{
	protected $server;
    public function before(){
        $this->server=new PHPRPC_Server();
    }

    /**
     * 获取sku的实际库存
     */
    public function action_index(){
    	//获取sku实际库存
		function putSkusCount($sku){
			$inventory=inventory::select_adapterstock($sku);
			return $inventory; 
		}

		$this->server->add('putSkusCount');
		$this->server->start();     
    }
}
